package structure.algorithm.leetcode;

public class TwoSum {
    public int[] twoSum(int[] nums, int target) {
        int[] dif = new int[] {};
        for (int a = 0; a < nums.length; a++) {
            for (int b = a + 1; b < nums.length; b++) {
                if (nums[a] + nums[b] == target) {
                    return new int[] { a, b };
                }
            }
        }
        return dif;
    }
}
